<template>
    <div>
        <my-header></my-header>
        <!-- 灰色线条 -->
        <split></split>
        <!-- 作者 -->
        <author></author>
        <split></split>
        <!-- 评论 -->
        <comment></comment>
        <split></split>
        <!-- <panel-s></panel-s> -->
        <!-- <panel-s></panel-s> -->
        <split></split>
        <!-- 版权声明+常见问题 -->
        <copyright :courseId='courseId'></copyright>
        <split></split>
        <!-- <panel-b></panel-b> -->
    </div>
</template>

<script type="text/ecmascript-6">
import myHeader from 'components/header/header'
import author from 'components/author/author'
// import panelS from 'base/panelS/panelS'
// import panelB from 'base/panelB/panelB'
import split from 'base/split/split'
import comment from 'components/comment/comment'
import copyright from 'components/copyright/copyright'

export default{
    data(){
        return {
            courseId:''
        }
    },
    components:{
        myHeader,
        author,
        // panelS,
        // panelB,
        split,
        comment,
        copyright
    },
    created(){
        let id = getQueryString('courseId') || window.localStorage.getItem('courseId')
        window.localStorage.setItem('courseId',id)
        this.courseId = parseInt(id)
        console.log(this.courseId)
    }
}
//获取页面携带的ID
function getQueryString(name) {  
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");  
    var r = window.location.search.substr(1).match(reg);  
    if (r != null) return unescape(r[2]);  
    return null;  
}  
</script>

<style lang="stylus" rel="stylesheet/stylus">

</style>